# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=shelf
pkgver=2.1.0
pkgrel=1
pkgdesc="Document and EBook collection manager"
# armhf blocked by extra-cmake-modules
arch="all !armhf !s390x !riscv64"
url="https://invent.kde.org/maui/shelf"
license="GPL-3.0-or-later"
depends="
	mauikit-texteditor
	"
makedepends="
	extra-cmake-modules
	kcoreaddons-dev
	ki18n-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	poppler-qt5-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qtquickcontrols2-dev
	qt5-qtxmlpatterns-dev
	samurai
	"
source="https://download.kde.org/stable/maui/shelf/$pkgver/shelf-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
d2f4eb272f18bf1bb1d62300d61c9cbdc655f2d7892808ef980ec37bd87df48a673ae4bd39f2532dd91f7538b1f5aed2afa32b4399ceacc8346f272d4588de98  shelf-2.1.0.tar.xz
"
